package jike.demo08;

import java.util.Queue;
import java.util.logging.Level;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description: 输出日志到中间件，比如kafka这种
 * @date 2022/10/27 22:06
 */
public class QueueLogger extends Logger {

    private Queue queue;

    public QueueLogger(String name, boolean enabled, Level level,Queue queue) {
        super(name, enabled, level);
        queue = queue;
    }

    @Override
    protected void doLog(Level level, String name) {
        Object poll = queue.poll();
        System.out.println(poll);
    }
}
